//
//  GZLiveSettingButton.swift
//  GLUZ
//
//  Created by lemon on 2025/3/10.
//

import UIKit

protocol GZLiveSettingButtonDelegate: AnyObject {
    func onLiveSettingButtonPressed()
}

extension GZLiveSettingButtonDelegate {
    func onLiveSettingButtonPressed() { }
}

open class GZLiveSettingButton: UIButton {
    
    weak var delegate: GZLiveSettingButtonDelegate?

    public override init(frame: CGRect) {
        super.init(frame: frame)
        self.setImage(ZegoUIKitLiveStreamIconSetType.设置.load(), for: .normal)
        self.addTarget(self, action: #selector(buttonClick), for: .touchUpInside)
    }
    
    required public init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    @objc func buttonClick() {
        self.delegate?.onLiveSettingButtonPressed()
    }

}

